package com.ruoyi.net.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.net.mapper.BusiMtnChannelRouteGraphMapper;
import com.ruoyi.net.domain.BusiMtnChannelRouteGraph;
import com.ruoyi.net.service.IBusiMtnChannelRouteGraphService;

/**
 * 业务-MTN Channel路由图link（顺序）Service业务层处理
 * 
 * @author tony
 * @date 2024-12-08
 */
@Service
public class BusiMtnChannelRouteGraphServiceImpl implements IBusiMtnChannelRouteGraphService 
{
    @Autowired
    private BusiMtnChannelRouteGraphMapper busiMtnChannelRouteGraphMapper;

    /**
     * 查询业务-MTN Channel路由图link（顺序）
     * 
     * @param id 业务-MTN Channel路由图link（顺序）主键
     * @return 业务-MTN Channel路由图link（顺序）
     */
    @Override
    public BusiMtnChannelRouteGraph selectBusiMtnChannelRouteGraphById(String id)
    {
        return busiMtnChannelRouteGraphMapper.selectBusiMtnChannelRouteGraphById(id);
    }

    /**
     * 查询业务-MTN Channel路由图link（顺序）列表
     * 
     * @param busiMtnChannelRouteGraph 业务-MTN Channel路由图link（顺序）
     * @return 业务-MTN Channel路由图link（顺序）
     */
    @Override
    public List<BusiMtnChannelRouteGraph> selectBusiMtnChannelRouteGraphList(BusiMtnChannelRouteGraph busiMtnChannelRouteGraph)
    {
        return busiMtnChannelRouteGraphMapper.selectBusiMtnChannelRouteGraphList(busiMtnChannelRouteGraph);
    }

    /**
     * 新增业务-MTN Channel路由图link（顺序）
     * 
     * @param busiMtnChannelRouteGraph 业务-MTN Channel路由图link（顺序）
     * @return 结果
     */
    @Override
    public int insertBusiMtnChannelRouteGraph(BusiMtnChannelRouteGraph busiMtnChannelRouteGraph)
    {
        String uuid = IdUtils.simpleUUID();
        if (StringUtils.isEmpty(busiMtnChannelRouteGraph.getId())) {
            busiMtnChannelRouteGraph.setId(uuid);
        }
        busiMtnChannelRouteGraph.setCreateBy(SecurityUtils.getUsername());
        busiMtnChannelRouteGraph.setCreateTime(DateUtils.getNowDate());
        busiMtnChannelRouteGraph.setUpdateBy(SecurityUtils.getUsername());
        busiMtnChannelRouteGraph.setUpdateTime(DateUtils.getNowDate());
        return busiMtnChannelRouteGraphMapper.insertBusiMtnChannelRouteGraph(busiMtnChannelRouteGraph);
    }

    /**
     * 修改业务-MTN Channel路由图link（顺序）
     * 
     * @param busiMtnChannelRouteGraph 业务-MTN Channel路由图link（顺序）
     * @return 结果
     */
    @Override
    public int updateBusiMtnChannelRouteGraph(BusiMtnChannelRouteGraph busiMtnChannelRouteGraph)
    {
        busiMtnChannelRouteGraph.setUpdateBy(SecurityUtils.getUsername());
        busiMtnChannelRouteGraph.setUpdateTime(DateUtils.getNowDate());
        return busiMtnChannelRouteGraphMapper.updateBusiMtnChannelRouteGraph(busiMtnChannelRouteGraph);
    }

    /**
     * 批量删除业务-MTN Channel路由图link（顺序）
     * 
     * @param ids 需要删除的业务-MTN Channel路由图link（顺序）主键
     * @return 结果
     */
    @Override
    public int deleteBusiMtnChannelRouteGraphByIds(String[] ids)
    {
        return busiMtnChannelRouteGraphMapper.deleteBusiMtnChannelRouteGraphByIds(ids);
    }

    /**
     * 删除业务-MTN Channel路由图link（顺序）信息
     * 
     * @param id 业务-MTN Channel路由图link（顺序）主键
     * @return 结果
     */
    @Override
    public int deleteBusiMtnChannelRouteGraphById(String id)
    {
        return busiMtnChannelRouteGraphMapper.deleteBusiMtnChannelRouteGraphById(id);
    }
}
